package base;

import java.util.ArrayList;
import java.util.List;

public abstract class Starter {

	public Starter(ArrayList<Class>lists)
	{
		int size = lists.size();
		for(int i=0;i<size;i++){
		System.setProperty("java.rmi.server.codebase", lists.get(i)
	            .getProtectionDomain().getCodeSource().getLocation().toString());
		}
		System.setProperty("java.security.policy", PolicyFileLocator.getLocationOfPolicyFile());
		
		if(System.getSecurityManager() == null) {
            System.setSecurityManager(new SecurityManager());
        }

        doCustomRmiHandling();
	}
	public abstract void doCustomRmiHandling();
}
